<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: 10953
  Date: 2021/1/26
  Time: 22:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>更新</h1>
<form action="updateBill" method="post">
    <input type="hidden" name="id" value="${bills.id}"> <%--隐藏域使用有安全隐患--%>
    <p>
        类型:
        <c:forEach var="type" items="${types}">
            <input type="radio" value="${type.id}" ${type.id==bills.id?'checked':''} name="typeid">${type.name}
        </c:forEach>
    </p>
    <p>标题:<input type="text" style="width: 500px" name="title" value="${bills.title}"></p>
    <p>日期:<input type="text" style="width: 100px" name="billtime" value="<fmt:formatDate value="${bills.billtime}" pattern="yyyy/MM/dd"></fmt:formatDate>">
        金额:<input type="text" style="width: 60px" name="price" value="${bills.price}">
    </p>
    <p>说明:<textarea cols="50" rows="4" name="explains" >${bills.explains}</textarea></p>
    <input type="reset" value="重置">
    <input type="submit" value="保存">
    <input type="button" value="返回">
</form>
</body>
</html>
